/**
 * @file       ConfimBox.h
 * @brief      TODO
 * @author     Huabo Zheng
 * @date       Jan 12, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#ifndef CONFIMBOX_H_
#define CONFIMBOX_H_

#include "Panel.h"
#include "Button.h"
#include "Label.h"

namespace NS_LCD_AFW
{

class CConfimBox: public CPanel
{
public:
	CConfimBox();
	CConfimBox(CPanel *pParent = NULL);

public:
	virtual ~CConfimBox();

public:
	void setText(const std::string &strText);

	int doModal(std::string info = "");

protected:
	virtual int onCreate();
	virtual int onClose();
	virtual void onOk();
	virtual void onCancel();
	virtual int onEscKeyPress();
	virtual int onEnterKeyPress();

private:
	void onOkBtnClick(int id, int param);
	void onCancelBtnClick(int id, int param);

private:
	CLabel *m_pLabel;
	CButton *m_pOkBtn;
	CButton *m_pCancelBtn;
	CPanel *m_pParentPanel;

private:
	DISABLE_COPY_CONSTRUCTOR_AND_ASSIGN_REFERENCE(CConfimBox);
};

} /* namespace NS_LCD_AFW */
#endif /* CONFIMBOX_H_ */
